//
//  DrawView.m
//  30204
//
//  Created by student on 16/4/6.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "DrawView.h"

@implementation DrawView

-(void)setSelimage:(UIImage *)selimage
{
    _selimage=selimage;
    [self setNeedsDisplay];
}

- (void)drawRect:(CGRect)rect
{
    UIImage *image=[UIImage imageNamed:@"langmuwine"];
    [image drawAtPoint:CGPointZero];
    [image drawInRect:CGRectMake(50, 50, 29, 45)];
    [image drawInRect:rect];
    
    [self.selimage drawInRect:rect];
    
    
    
    
    NSString *str=@"何佳烨是基佬";
    NSMutableDictionary *dict=[NSMutableDictionary dictionary];
    dict[NSForegroundColorAttributeName]=[UIColor greenColor];
    dict[NSFontAttributeName]=[UIFont systemFontOfSize:15];
    
    NSAttributedString *astr=[[NSAttributedString alloc]initWithString:str attributes:dict];
    [str drawAtPoint:CGPointMake(100, 100) withAttributes:dict];
    [astr drawAtPoint:CGPointMake(100, 100)];
}


@end
